# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-net-packet
_pkgname=Net-Packet
pkgver=3.28
pkgrel=13
pkgdesc='A unified framework to send a receive packets.'
arch=('any')
url='https://metacpan.org/release/Net-Packet'
license=('GPL' 'PerlArtistic')
depends=('perl-net-ipv4addr' 'perl-bit-vector' 'perl-net-write>=1.00'
         'perl-socket6' 'perl-net-pcap>=0.12' 'perl-net-libdnet'
         'perl-class-gomor>=1.00' 'perl-net-ipv6addr')
makedepends=('perl-extutils-makemaker')
checkdepends=('perl-net-pcap')
options=('!emptydirs')
source=("http://cpan.metacpan.org/authors/id/G/GO/GOMOR/$_pkgname-$pkgver.tar.gz")
sha512sums=('f0ef2da562049cd2630f25d5557ff092ed478d328ca35af78b46b91b36bb893596b47935a093c1ef00c3bca6871b16619c41cc1ebdebaf2c133c68ee1ff8aeed')

build() {
  cd "$_pkgname-$pkgver"

  sed -i '/^auto_install/d' Makefile.PL

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor

  make
}

package() {
  cd "$_pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  find "$pkgdir" -name '.packlist' -o -name '*.pod' -delete
}

